package com.lzx.article.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 评论表
 * </p>
 *
 * @author lzx
 * @since 2023-01-20
 */
@Getter
@Setter
@ApiModel(value = "Comments对象", description = "评论表")
public class Comments implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("编号")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("文章id")
    private Integer articleId;

    @ApiModelProperty("评论人id")
    private Integer userId;

    @ApiModelProperty("评论人昵称")
    private String nickname;

    @ApiModelProperty("评论人头像")
    private String avatar;

    @ApiModelProperty("评论内容")
    private String content;

    @ApiModelProperty("点赞数")
    private Integer likeCount;

    @ApiModelProperty("是否置顶(0表示不置顶，1表示置顶)")
    private Integer isTop;

    @ApiModelProperty("是否已读(0表示未读，1表示已读)")
    private Integer isRead;

    @ApiModelProperty("评论时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @TableField(exist = false)
    private List<SecondComments> secondCommentsList;
}
